import smtplib
from email.mime.text import MIMEText

msg = MIMEText('人生苦短，我学Python！')
msg['Subject'] = '来自Python的一封邮件'
msg['From'] = 'system@cppwork.com'
msg['To'] = '1006236360@qq.com'

smtp = smtplib.SMTP()
smtp.connect('smtp.cppwork.com', 25)
smtp.login('system@cppwork.com', 'runD2Qs0jl')
smtp.send_message(msg)
smtp.quit()

print(smtp)
